[BUUCTF]简单注册器

又是个apk, 直接上jadx, 反编译MainActivity, 直接找到关键算法

image-20220123173641201

Ctrl+C, Ctrl+V复刻

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <cstdio>

using namespace std;

int main()
{
char x[] = "dd2940c04462b4dd7c450528835cca15";
x[2] = (char)((x[2] + x[3]) - 50);
x[4] = (char)((x[2] + x[5]) - 48);
x[30] = (char)((x[31] + x[9]) - 48);
x[14] = (char)((x[27] + x[28]) - 97);
for (int i = 0; i < 16; i++) {
char a = x[31 - i];
x[31 - i] = x[i];
x[i] = a;
}
printf("flag{%s}", x);
}
//flag{59acc538825054c7de4b26440c0999dd}